63°F

Aaron Parecki

  • Articles
  • Notes
  • Photos
  • Day 90: Person-tags for OwnYourSwarm Checkins #100DaysOfIndieWeb

    March 20, 2017

    Today I added support for person-tags and mentioning users to OwnYourSwarm. If you tag someone in your Swarm checkin (e.g. tap the + icon and find them in the list), then it will be converted to a person-tag in the h-entry. In addition, any usernames you mention in the text of your checkin will cause the content to be sent to your Micropub endpoint as HTML, including hyperlinks for the names of people mentioned.

    If any of the people in your checkin also use OwnYourSwarm, then their URL is sent as their personal URL instead of their Foursquare profile. (Swarm doesn't provide a field to enter your website, so I can't make it look there.)

    Here's a test checkin I made with two person-tags (myself and some spam account that friended my test account.) Swarm always includes the "with x, y, z" text in the checkin text when you tag someone in the checkin.

    Notice that the checkin comment in this one is sent as HTML! When the checkin text includes mentions of people, OwnYourSwarm now sends the content as HTML with the appropriate hyperlinks. Here's what this checkin looks like in the JSON request that OwnYourSwarm sends, including the person-tags and HTML content.

    {
      "type": [
        "h-entry"
      ],
      "properties": {
        "published": [
          "2017-03-20T11:05:57-07:00"
        ],
        "syndication": [
          "https://www.swarmapp.com/user/10827223/checkin/58d01a050acb6a497ee585e4"
        ],
        "content": [
          {
            "value": "with aaronpk, Asha",
            "html": "with <a href=\"https://aaronparecki.com/\">aaronpk</a>, <a href=\"https://foursquare.com/user/80541223\">Asha</a>"
          }
        ],
        "category": [
          {
            "type": [
              "h-card"
            ],
            "properties": {
              "url": [
                "https://aaronparecki.com/",
                "https://foursquare.com/user/59164"
              ],
              "name": [
                "aaronpk"
              ],
              "photo": [
                "https://igx.4sqi.net/img/user/300x300/QREPPTELDVOJ5CE5.jpg"
              ]
            }
          },
          {
            "type": [
              "h-card"
            ],
            "properties": {
              "url": [
                "https://foursquare.com/user/80541223"
              ],
              "name": [
                "Asha"
              ],
              "photo": [
                "https://igx.4sqi.net/img/user/300x300/80541223-EKXLLRPVBJ4GI2A0.jpg"
              ]
            }
          }
        ],
        "checkin": [
          {
            "type": [
              "h-card"
            ],
            "properties": {
              "name": [
                "Hollywood Theatre"
              ],
              "url": [
                "https://foursquare.com/v/42814b00f964a520db211fe3",
                "http://hollywoodtheatre.org",
                "https://twitter.com/hollywoodtheatr"
              ],
              "tel": [
                "(503) 281-4215"
              ],
              "latitude": [
                45.535709269884
              ],
              "longitude": [
                -122.62089771776
              ],
              "street-address": [
                "4122 NE Sandy Blvd"
              ],
              "locality": [
                "Portland"
              ],
              "region": [
                "OR"
              ],
              "country-name": [
                "United States"
              ]
            }
          }
        ]
      }
    }

    If you just mention someone in your checkin without tapping the + icon to actually check them in, then no person tags will be created, but the content will still be sent as HTML.

    {
      "type": [
        "h-entry"
      ],
      "properties": {
        "published": [
          "2017-03-20T14:32:24-07:00"
        ],
        "syndication": [
          "https://www.swarmapp.com/user/10827223/checkin/58d04a684287c97a80e5da53"
        ],
        "content": [
          {
            "value": "With aaronpk",
            "html": "With <a href=\"https://aaronparecki.com/\">aaronpk</a>"
          }
        ],
        "checkin": [
          {
            "type": [
              "h-card"
            ],
            "properties": {
              "name": [
                "Hollywood Theatre"
              ],
              "url": [
                "https://foursquare.com/v/42814b00f964a520db211fe3",
                "http://hollywoodtheatre.org",
                "https://twitter.com/hollywoodtheatr"
              ],
              "tel": [
                "(503) 281-4215"
              ],
              "latitude": [
                45.535709269884
              ],
              "longitude": [
                -122.62089771776
              ],
              "street-address": [
                "4122 NE Sandy Blvd"
              ],
              "locality": [
                "Portland"
              ],
              "region": [
                "OR"
              ],
              "country-name": [
                "United States"
              ]
            }
          }
        ]
      }
    }

    Further reading:

    • checkin
    • person tag
    • h-card

    Portland, Oregon
    Mon, Mar 20, 2017 11:51am -07:00 #100daysofindieweb #ownyourswarm #checkins
    1 like 2 mentions
    • Ryan Barrett

    Other Mentions

    • Aaron Parecki aaronparecki.com
      My 2017 Year in Review
      Thu, Jan 4, 2018 2:40pm -08:00
    • 100 Days of IndieWeb aaronparecki.com/tag/100daysofindieweb
      Day 90: Person-tags for OwnYourSwarm Checkins #100DaysOfIndieWeb: aaronparecki.com/2017/03/20/8/d…
      Mon, Mar 20, 2017 6:55pm +00:00 (via brid-gy.appspot.com)
Posted in /articles using quill.p3k.io

Hi, I'm Aaron Parecki, Director of Identity Standards at Okta, and co-founder of IndieWebCamp. I maintain oauth.net, write and consult about OAuth, and participate in the OAuth Working Group at the IETF. I also help people learn about video production and livestreaming. (detailed bio)

I've been tracking my location since 2008 and I wrote 100 songs in 100 days. I've spoken at conferences around the world about owning your data, OAuth, quantified self, and explained why R is a vowel. Read more.

  • Director of Identity Standards at Okta
  • IndieWebCamp Founder
  • OAuth WG Editor
  • OpenID Board Member

  • 🎥 YouTube Tutorials and Reviews
  • 🏠 We're building a triplex!
  • ⭐️ Life Stack
  • ⚙️ Home Automation
  • All
  • Articles
  • Bookmarks
  • Notes
  • Photos
  • Replies
  • Reviews
  • Trips
  • Videos
  • Contact
© 1999-2025 by Aaron Parecki. Powered by p3k. This site supports Webmention.
Except where otherwise noted, text content on this site is licensed under a Creative Commons Attribution 3.0 License.
IndieWebCamp Microformats Webmention W3C HTML5 Creative Commons
WeChat ID
aaronpk_tv